package project.ia04.agents.studio.GUICommunication;

import jade.core.behaviours.OneShotBehaviour;
import jade.lang.acl.ACLMessage;
import project.ia04.agents.studio.StudioAgent;
import project.ia04.utils.Data;

public class TrainBehaviour extends OneShotBehaviour {
	
	private ACLMessage message;

	public TrainBehaviour(ACLMessage message) {
		this.message = message;
	}

	@Override
	public void action() {
		ACLMessage newMess = new ACLMessage(ACLMessage.REQUEST);
		newMess.setConversationId(Data.TRAIN);
		((StudioAgent)myAgent).setCA(((StudioAgent)myAgent).getCA() - 10f);
		newMess.addReceiver(((StudioAgent)myAgent).getStaffAgent(message.getContent()));
		myAgent.send(newMess);
	}


}
